package com.ws.ssmzongjie3.service.impl;

import com.ws.ssmzongjie3.bean.Carousel;
import com.ws.ssmzongjie3.mapper.CarouselMapper;
import com.ws.ssmzongjie3.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CarouselServiceImpl implements CarouselService {
    @Autowired
    private CarouselMapper carouselMapper;

    @Override
    public int insertCarousel(Carousel carousel) {

        return carouselMapper.insertCarousel(carousel);
    }

    @Override
    public int deleteCarousel(Carousel carousel) {

        return carouselMapper.deleteCarousel(carousel);
    }

    @Override
    public Carousel getCarouselById(Carousel carousel) {
        return carouselMapper.getCarouselById(carousel);
    }

    @Override
    public void updateCarousel(Carousel carousel) {
        carouselMapper.updateCarousel(carousel);
    }

    @Override
    public List<Carousel> listCarousel(Carousel carousel) {
        return carouselMapper.listCarousel(carousel);
    }

    @Override
    public List<Carousel> listCarouselWithRoute(Carousel carousel) {
        return carouselMapper.listCarouselWithRoute(carousel);
    }
}
